home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hyper Stacks 1994 May
/
Hyper Stacks (Pacific HiTech)(1994)[Mac].iso
/
Education
/
Geography Challenge
/
stack_-1.xml
< prev
Wrap
Extensible Markup Language
|
1994-04-28
|
8KB
|
20 lines
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
<stack>
<name>in</name>
<id>-1</id>
<cardCount>1</cardCount>
<cardID>2991</cardID>
<listID>2277</listID>
<cantModify><false /></cantModify>
<cantDelete><false /></cantDelete>
<cantAbort><false /></cantAbort>
<cardSize>
<width>448</width>
<height>216</height>
</cardSize>
<script>••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••-- GEOGRAPHY CHALLENGE (version 0.51 -- early test version 12/24/93)-- Up-to-date (12/93) challenging geography quiz software-- Learn all the world's countries, their capitals, and a big city-- By Doug Eernisse (programming) and Arie Eernisse (9-year old wizard)-- If you like it, PLEASE send Arie a postcard of your home town-- (or anywhere, really) to: 1208 Olivia, Ann Arbor, MI 48104 USA-- This software © 1993 by Arie Eernisse and Doug Eernisse.-- It may not be sold or used commercially without permission.••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••on openstackglobal theNumbers,theContinents,theCountries,theCapitals,theBigCitiesdoMenusput fld number into theNumbersput fld continent into theContinentsput fld country into theCountriesput fld capital into theCapitalsput fld bigcity into theBigCitiesput item 1 of fld defaults into drput item 3 of fld defaults into dpdoRegion drdoPlayer dppass openStackend openstackon closestack-- global-- if wrongStack() then pass closeStackif the freeSize of this stack > (the size of this stack*.1) thenset cursor to busyput "Compacting Stack"doMenu "Compact Stack"put emptyhide msgend ifpass closeStackend closestackon resume-- if wrongStack() then pass resumepass resumeend resumeon suspend-- if wrongStack() then pass suspendpass suspendend suspendon resumeStack-- if wrongStack() then pass resumeStacksetupMenuspass resumeStackend resumeStackon suspendStack-- if wrongStack() then pass suspendStackreset menuBarpass suspendStackend suspendStackfunction wrongStackput the value of word 2 of the long name of me into TheStackNamereturn (TheStackName is not line 1 of the stacks)end wrongStackon normalMenusreset menuBarput "Special Menus,-" before menu "Edit" with menuMessages "doMenus,,"end normalMenuson doMenussetupMenus-- send setupBgMenus to this bgend doMenuson setupMenusglobal order1,order2,ifcr,ofcr,dir1,dir2lock screenset cursor to busyreset menuBarif the menus contains "Go" then delete menu "Go"if the menus contains "Tools" then delete menu "Tools"if the menus contains "Objects" then delete menu "Objects"if the menus contains "Font" then delete menu "Font"if the menus contains "Style" then delete menu "Style"set cursor to busyput "About Geo Challenge…" into menuItem 1 of menu "Apple" ¬with menuMsg "doAbout"set cursor to busydelete menuItem 1 of menu "File"repeat with x = (number of menuItems in menu "File")-1 down to 6delete menuItem x of menu "File"end repeatput "Import Data,Export Data,-" after¬menuitem 4 of menu "File" with menuMsgs "doImport,doExport,,"set commandChar of menuItem "Import Data" of menu ¬"File" to "I"set commandChar of menuItem "Export Data" of menu ¬"File" to "E"repeat with x = (number of menuItems in menu "Edit") down to 7delete menuItem x of menu "Edit"end repeatput "Standard Menus,-" before menu "Edit" with menumsgs "normalMenus,,"if there is not a menu "Quiz" then create menu "Quiz"put "Help,-,Capitals Quiz,Countries Quiz,Cities Quiz,-,"&¬"One Player,Two Players,Three Players,Four Players" into menu ¬"Quiz" with menuMsgs "doHelp,,doQuiz capitals,doQuiz countries,"&¬"doQuiz cities,,doplayer 1,doplayer 2,doplayer 3,doplayer 4"set commandChar of menuItem "Help" of menu ¬"Quiz" to "?"if there is not a menu "Region" then create menu "Region"put "Worldwide,Americas,Eurasia,Africa,Oceania" ¬into menu "Region" with menuMsgs "doregion 1,doregion 2,doregion 3,"&¬"doregion 4,doregion 5"set the checkmark of menuItem 1 of menu "Region" to trueunlock screenend setupMenuson doplayer whichglobal theplayer,numPlayerslock screenput "One Player,Two Players,Three Players,Four Players" into misrepeat with x= 1 to 4put "Score"&x into fldnmput "0" into fld fldnmput "Player "&x into bnmif x = which thenset the checkmark of menuItem item which of mis of menu "quiz" ¬to trueset hilite of bg btn bnm to falseshow bg btn bnmshow fld fldnmput x into numPlayersput x into item 3 of fld defaultselseset the checkmark of menuitem item x of mis of menu "quiz" to falseset hilite of bg btn bnm to falseif x > which thenhide bg btn bnmhide fld fldnmelseshow bg btn bnmshow fld fldnmend ifend ifend repeatset hilite of bg btn "Player 1" to trueput "1" into thePlayerunlock screen with dissolve fastend doplayeron doregion whatglobal whRegion,wr,quizput "Worldwide,Americas,Eurasia,Africa,Oceania" into RegListif the checkmark of menuItem what of menu "Region" is false thenrepeat with x = 1 to 5if what ≠ x thenset the checkmark of menuItem x of menu "Region" to falseelseset the checkmark of menuItem x of menu "Region" to trueput item x of RegList into theRegionput x into item 1 of fld defaultsend ifend repeatend ifput true into whRegionif theRegion is "Americas" thenput "North America,South America,Central America,Caribbean" into wrelse if theRegion is "Eurasia" thenput "Europe,Asia" into wrelse if theRegion is "Africa" thenput "Africa" into wrelse if theRegion is "Oceania" thenput "Oceania,Australia" into wrelseput false into whRegionput "" into wrend ifif quiz = "" then put item 2 of fld "defaults" into quizput quiz&&"quiz" into bnset the checkmark of menuitem bn of menu "Quiz" to truesend mouseUp to btn bn of cd 1end doregionon doAboutanswer "Geography Challenge, by Arie Eernisse (9) and his dad, Doug Eernisse, "&¬"© 1993, is postcardware: if you like it, please send Arie a "&¬"postcard of your hometown (send to: 1208 Olivia, Ann Arbor, "&¬"MI 48104 USA)." with "Cool!"end doAbouton doCmdKey whKey,whMenurepeat with w=1 to number of chars in whKeyif char w of whKey ≠ "-" thenset commandChar of menuItem w of menu whMenu to char w of whKeyend ifend repeatend doCmdKeyfunction lastItem TheDelimiter,Stringif TheDelimiter is in Stringthen put lastItem(TheDelimiter,char offset(TheDelimiter,String)¬+ 1 to length(String) of String) into Stringreturn Stringend lastItemfunction clickLine-- returns line number clicked on of any fieldif the style of the target = "scrolling" thenreturn ((item 2 of the clickLoc - top of target-4+scroll of target) ¬div textheight of target) + 1else-- clickLine for non scrolling fieldsreturn ((item 2 of the clickLoc - top of target - 4) ¬div textheight of target) + 1end ifend clickLinefunction selectTheLine whichLineput line whichLine of target into choiceif choice <> empty thenget offset(return & choice,target) + 1 --include the carriage returnselect char it to length(choice) + it of targetend ifreturn choiceend SelecttheLine</script>
<background id="2626" file="background_2626.xml" name="" />
<card id="2991" file="card_2991.xml" marked="false" name="" owner="2626" />
</stack>